<template>
  <h3>父组件</h3>
  <h4>子给的玩具: {{ toy }}</h4>
  <Child @send-toy="saveToy" />
</template>

<script setup lang="ts" name="Father">
import Child from './components/Child.vue'
import { ref } from 'vue';

let toy = ref('')

function saveToy(value: string) {
  toy.value = value
}

</script>
